<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../lib/react.development.js"></script>
    <script src="../lib/react-dom.development.js"></script>
    <script src="../lib/babel.min.js"></script>
</head>
<div id="root">
</div>

<body>
    <script type="text/babel">
        const root = ReactDOM.createRoot(document.getElementById('root'));
        // 定义Header 类组件 继承 React.Component
        class Header extends React.Component{
          render() {
            return (
                    <div className="header">我是头部</div>
            )
          }
        }
        class Main extends React.Component{
          render() {
            return (
                    <div className="main">我是内容</div>
            )
          }
        }
        class Footer extends React.Component{
          render() {
            return (
                    <div className="footer">我是底部</div>
            )
          }
        }
        // 使用类组件
        // 单标签调用&& 对标签调用
        root.render((
            <>
              <Header/>
              <Main></Main>
              <Footer/>
            </>
        ));
    </script>
</body>
</html>